import Vue from 'vue';
import Router from 'vue-router';
const register = resolve => require(['@/page/common/register'], resolve) 
const loginPage = resolve => require(['@/page/common/login-page'], resolve) 
const rechargePassword = resolve => require(['@/page/common/recharge-password'], resolve) 
const userList = resolve => require(['@/page/userManager/userList'], resolve)
const userEdit = resolve => require(['@/page/userManager/userEdit'], resolve)

const msgList = resolve => require(['@/page/msgManager/msgList'], resolve)
const msgEdit = resolve => require(['@/page/msgManager/msgEdit'], resolve)
const msgDetail = resolve => require(['@/page/msgManager/msgDetail'], resolve)
const feedList = resolve => require(['@/page/msgManager/feedList'], resolve)
const feedDetail = resolve => require(['@/page/msgManager/feedDetail'], resolve)

const talentInList = resolve => require(['@/page/talentInManager/talentInList'], resolve)
const talentInEdit = resolve => require(['@/page/talentInManager/talentInEdit'], resolve)
const talentInDetail = resolve => require(['@/page/talentInManager/talentInDetail'], resolve)
const talentOutList = resolve => require(['@/page/talentOutManager/talentOutList'], resolve)
const talentOutEdit = resolve => require(['@/page/talentOutManager/talentOutEdit'], resolve)
const talentOutDetail = resolve => require(['@/page/talentOutManager/talentOutDetail'], resolve)

const sinceMoneyList = resolve => require(['@/page/employManager/sinceMoneyList'], resolve)
const recommandMoneyList = resolve => require(['@/page/employManager/recommandMoneyList'], resolve)
const signingList = resolve => require(['@/page/employManager/signingList'], resolve)
const signedList = resolve => require(['@/page/employManager/signedList'], resolve)
const refundList = resolve => require(['@/page/employManager/refundList'], resolve)
const orderDetail = resolve => require(['@/page/employManager/orderDetail'], resolve)

const historyList = resolve => require(['@/page/historyManager/historyList'], resolve)

const ruleEdit = resolve => require(['@/page/ruleManager/ruleEdit'], resolve)
const ruleList = resolve => require(['@/page/ruleManager/ruleList'], resolve)

const bannerList = resolve => require(['@/page/banner/bannerList'], resolve)

//系统权限
const roleSet = resolve => require(['@/page/system/roleSet'], resolve)
const userSet = resolve => require(['@/page/system/userSet'], resolve)
const roleList = resolve => require(['@/page/system/roleList'], resolve)
const roleEdit = resolve => require(['@/page/system/roleEdit'], resolve)
const accountList = resolve => require(['@/page/system/accountList'], resolve)
const accountEdit = resolve => require(['@/page/system/accountEdit'], resolve)

Vue.use(Router)

export default new Router({
  mode: 'history',
  base:'/sys/', 
  routes: [
      {
          path: '/loginPage',
          name: 'loginPage',
          component: loginPage
      },
      {
        path: '/register',
        name: 'register',
        component: register
      },
      {
        path: '/rechargePassword',
        name: 'rechargePassword',
        component: rechargePassword
      },
      {
        path: '/',
        name: 'userList',
        component: userList
      },
      {
        path: '/userEdit',
        name: 'userEdit',
        component: userEdit
      },
      {
          path: '/msgList',
          name: 'msgList',
          component: msgList
      },
      {
          path: '/msgEdit',
          name: 'msgEdit',
          component: msgEdit
      },
      {
          path: '/msgDetail',
          name: 'msgDetail',
          component: msgDetail
      },
      {
          path: '/feedList',
          name: 'feedList',
          component: feedList
      },
      {
          path: '/feedDetail',
          name: 'feedDetail',
          component: feedDetail
      },
      {
          path: '/talentInList',
          name: 'talentInList',
          component: talentInList
      },
      {
          path: '/talentInEdit',
          name: 'talentInEdit',
          component: talentInEdit
      },
      {
          path: '/talentInDetail',
          name: 'talentInDetail',
          component: talentInDetail
      },
      {
          path: '/talentOutList',
          name: 'talentOutList',
          component: talentOutList
      },
      {
          path: '/talentOutEdit',
          name: 'talentOutEdit',
          component: talentOutEdit
      },
      {
          path: '/talentOutDetail',
          name: 'talentOutDetail',
          component: talentOutDetail
      },
      {
          path: '/sinceMoneyList',
          name: 'sinceMoneyList',
          component: sinceMoneyList
      },
      {
          path: '/recommandMoneyList',
          name: 'recommandMoneyList',
          component: recommandMoneyList
      },
      {
          path: '/signingList',
          name: 'signingList',
          component: signingList
      },
      {
          path: '/signedList',
          name: 'signedList',
          component: signedList
      },
      {
          path: '/refundList',
          name: 'refundList',
          component: refundList
      },
      {
          path: '/orderDetail',
          name: 'orderDetail',
          component: orderDetail
      },
      {
          path: '/historyList',
          name: 'historyList',
          component: historyList
      },
      {
          path: '/ruleEdit',
          name: 'ruleEdit',
          component: ruleEdit
      },
      {
          path: '/ruleList',
          name: 'ruleList',
          component: ruleList
      },
      {
            path: '/bannerList',
            name: 'bannerList',
            component: bannerList
      },
      {
          path: '/system/roleList',
          name: 'roleList',
          component: roleList,
      },
      {
          path: '/system/userSet',
          name: 'accountList',
          component: accountList,
      },
      {
          path: '/system/roleEdit',
          name: 'roleEdit',
          component: roleEdit,
      },
      {
          path: '/system/accountEdit',
          name: 'accountEdit',
          component: accountEdit,
      },
  ]
})
